import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import './assets/css/global.css'
import axios from 'axios'
import './assets/fonts/iconfont.css'
import TreeTable from 'vue-table-with-tree-grid'

Vue.component('tree-table', TreeTable)
axios.defaults.headers['Authorization'] = window.sessionStorage.getItem('token');
axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/'
Vue.prototype.$http = axios
Vue.config.productionTip = false

Vue.filter('setTimer', value => {
  var date = new Date(value);
  return date.getFullYear() + '-' + date.getMonth()+1 + '-' + date.getDate()
})

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
